[U, V] = dftuv(8, 5);

CD = zeros(8, 5);
OD = zeros(8, 5);
C = [4.5, 3];
O = [1, 1];
for i = 1:1:8
    for j = 1:1:5
        CD(i, j) = my_dist(C, [i, j]);
        OD(i, j) = my_dist(O, [i, j]);
    end 
end

CD
OD